﻿using System;
using NUnit.Framework;

namespace openxmlconv
{
    [TestFixture]
    public class DocumentFixture
    {
        [Test]
        public void AddParagraph()
        {
            Document d = new Document();
            d.AddParagraph(new Paragraph("teste1"));
            d.AddParagraph(new Paragraph("teste2"));
            //Assert.AreEqual("teste1", d[0].getText());
            //Assert.AreEqual("teste2", d[1].getText());
        }
        [Test]
        public void EqualsTest()
        {
            Document d1 = new Document();
            Document d2 = new Document();
            d1.AddParagraph(new Paragraph("test"));            
            d2.AddParagraph(new Paragraph("test"));
            Assert.IsTrue(d1.Equals(d2));
        }
        [Test]
        public void ForEachTest()
        {
            Document d1 = new Document();
            d1.AddParagraph(new Paragraph("test"));
            d1.AddParagraph(new Paragraph("test"));
            foreach (Paragraph p in d1){
                return;
            }            
            Assert.Fail();
        }
    }
}
